package com.example.exercise.es.initializer;

import com.example.exercise.es.doctor.service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class Runer implements CommandLineRunner {
    @Autowired
    private DoctorService doctorService;

    @Override
    public void run(String... args) {
//        String path = "F:/f/code-collect/sql/doctor.sql";
        String path = "F:/f/code-collect/sql/doctor_server_type.sql";
        int cnt = doctorService.execSql(path);
        System.out.println("success count: " + cnt);
    }
}
